<?php

if (!defined('TOBBIVM'))
	header('location:/template/notrepassing.php');
/**
 * This file is part of TobbiVMShop.
 *
 * TobbiVMShop is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * TobbiVMShop is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with TobbiVMShop.  If not, see <http://www.gnu.org/licenses/>.
 */
/**
 * create delete-now page
 * get: admin.delete.tpl.php
 * used from admin.page.php
 *
 * @version    $Id$
 * @package    TobbiVM-Shop
 * @copyright  Copyright (C) 2012
 * @author     Norbert Gebert
 * @license    GPL3
 */
$deleteIds = '';

foreach ($_POST['marker'] as $idx)
{
	$idx = $refValidate->cleanslash($idx);
	db::getInstance()->where("user_id", $idx);
	$result = db::getInstance()->getOne("user");
	$userData[] = array('userNamex' => $result['user_name'],
	 'userIdx' => $result['user_id']);
	$deleteIds .= $result['user_id'] . '-';
}

$refPage->assign('startForm',
	'action="index2.php?page=' . $page . '&sub=' . $subpage .
	'&func=deleteNow" method="post"');
$refPage->assign('data', $userData);

$refPage->assign('btnDeleteNow',
	'<input type="hidden" name="deleteIds" id="deleteIds" value="' . $deleteIds . '" />' .
	'<input type="submit" name="submit" id="deleteNow" value="' . _('Delete now') . '" />');

$refPage->assign('btnAbort',
	'<input type="submit" name="submit" id="cancel" value="' . _('Cancel') . '" />');

$refPage->addtpl('content', '/user/admin.delete.tpl.php');
$refPage->assign('pageTitle', _('Can the following admin entry(s) be deleted?'));
$refPage->assign('summary', _('Entries are permanently deleted!'));
$refPage->assign('adminId', _('ID'));
$refPage->assign('adminName', _('Admin-Name'));
?>